<template>
    <!-- <v-chip :color="getColor(item)" light>{{ formatStatus(item) }}</v-chip> -->
    <div>
    <e-chip :text="formatStatus($data.data.status)" :color="getColor($data.data.status)"></e-chip>
    </div>
</template>

<script>
import moment from 'moment'
export default {
  data () {
    return {}
  },
  created () {

  },
  methods: {
    // $data.data.message
    formatStatus (status) {
      if (status === 'Ready' && moment().isAfter(this.$data.data.expireDate)) {
        return 'Expired'
      }
      return status
    }
  },
  getColor (status) {
    if (status === 'Received') {
      return 'green'
    } else if (status === 'Ready') {
      if (moment().isAfter(this.$data.data.expireDate)) {
        return 'grey'
      }
      return 'orange'
    }
  }
}
</script>

<style scoped lang="scss">

</style>
